using System;
using UnityEngine.Events;

namespace YooAssetsSystem.Patch
{
    public class PatchEvent
    {
        public UnityAction<string> ChangeStateEvent;

        /// 需要更新 int: 文件数 long: 文件总大小
        public UnityAction<int, long, UnityAction> NeedDownloadEvent;

        /// 下载进度 文件总数, 当前下载数, 文件总大小, 当前下载大小
        public UnityAction<int, int, long, long> DownloadProgressEvent;

        /// 下载速度 kb/s
        public UnityAction<float> DownloadSpeedEvent;

        /// 更新完成回调
        public UnityAction<string> PatchDoneEvent;

        // 失败回调 更新中任何一个环节失败都认为更新失败, 可以调用patch.Run重新更新
        public UnityAction<string> UpdateFailedEvent;
    }
}